
import com.adobe.cairngorm.control.CairngormEventDispatcher;

import net.optix.ip.events.ReturnCaseEvent;
import net.optix.ip.model.ModelLocator;
[Bindable]
private var model:ModelLocator	=	ModelLocator.getInstance();

private var _confirm:Object;
public function set confirm(value:Object):void
{
	_confirm	=	value;
	if(value.bConfirm == 1)
	{
		this.visible	=	true;
	}
	else
	{
		this.visible	=	false;
	}
}
public function get confirm():Object
{
	return _confirm;
}

private var _category:int;
public function set category(value:int):void
{
	_category	=	value;
}
public function get category():int
{
	return _category;
}



public function returnCase():void
{
	var event:ReturnCaseEvent;
	switch(_category)
	{
		case 0:
			event	=	new ReturnCaseEvent(model.currentInvention.inventionID,0);
			break;
		case 1:
			event	=	new ReturnCaseEvent(model.currentInvention.inventionID,1);
			break;
		case 2:
			event	=	new ReturnCaseEvent(model.currentInvention.inventionID,2);
			break;
	}
	com.adobe.cairngorm.control.CairngormEventDispatcher.getInstance().dispatchEvent(event);
}